package org.one.stone.soup.grfxML.plugin.function;


import org.one.stone.soup.grfxML.DataState;
import org.one.stone.soup.grfxML.GrfxMLEngine;
import org.one.stone.soup.grfxML.plugin.SimplePlugin;
import org.one.stone.soup.grfxML.plugin.grfxMLCaster;
import org.one.stone.soup.mjdb.data.field.DataLinker;
import org.one.stone.soup.mjdb.data.field.Field;

public class BackgroundRefresh extends SimplePlugin {


	public static final int ARG_TRIGGER = 0;

	private DataState trigger = new org.one.stone.soup.grfxML.DataState();
/**
 * Mover constructor comment.
 */
public BackgroundRefresh (GrfxMLEngine engine){
	super(engine);
}
/**
 * initialize method comment.
 */
public void initialize() {}
/**
 * process method comment.
 */
public void process()
{
	if(trigger.getValue()==true)
	{
		getEngine().getAPI().refreshBackground();
	}
}
/**
 * register method comment.
 */
public void register(DataLinker store)
{

	trigger = grfxMLCaster.cast(trigger,getArg(trigger,ARG_TRIGGER,store));
}
/**
 * replace method comment.
 */
public void replace(Field oldObj, Field newObj)
{

	trigger = grfxMLCaster.replace(trigger,oldObj,newObj);

}
/**
 * stop method comment.
 */
public void stop() {}
}
